<?php

/**
 * 人才交流控制器
 */
class HrController extends BaseController {

	public function listPositions()
	{
		$positionsArr = $this->getPositions();
        return $this->makeView('hr.list', $positionsArr);
	}

	public function viewPosition($id)
	{
		$positionArr = $this->getPosition($id);
        return $this->makeView('hr.view', $positionArr);
	}

	protected function getPosition($id)
	{
		return $this->getPositions()[$id];
	}

	protected function getPositions()
	{
		$positions = [];
		$positions[] = array(
			'id' => 1,
			'title' => '律师助理',
			'position_count' => '4',
			'created_at' => date ("d-m-Y H:i"),
			'company_address' => '深圳福田区',
			'company_name' => '律团科技有限公司',
			'company_size' => '20',
			'education' => '本科以上学历',
			'position_responsibilities' => '协助律师',
			'position_requirements' => '熟悉法律条例',
			'contact_email' => 'hr@wdlst.com',
			'contact_phone' => '12345678901'
		);
		$positions[] = array(
			'id' => 2,
			'title' => 'APP市场推广',
			'position_count' => '1',
			'created_at' => date ("d-m-Y H:i"),
			'company_address' => '深圳福田区',
			'company_name' => '律团科技有限公司',
			'company_size' => '20',
			'education' => '本科以上学历',
			'position_responsibilities' => '负责APP的市场推广',
			'position_requirements' => '熟悉市场推广的步骤和流程',
			'contact_email' => 'hr@wdlst.com',
			'contact_phone' => '12345678901'
		);
		$positions[] = array(
			'id' => 3,
			'title' => '平面设计师',
			'position_count' => '2',
			'created_at' => date ("d-m-Y H:i"),
			'company_address' => '深圳福田区',
			'company_name' => '律团科技有限公司',
			'company_size' => '20',
			'education' => '本科以上学历',
			'position_responsibilities' => '负责设计市场推广的平面资料',
			'position_requirements' => '有一定的美术功底',
			'contact_email' => 'hr@wdlst.com',
			'contact_phone' => '12345678901'
		);
		$positions[] = array(
			'id' => 4,
			'title' => '运营经理',
			'position_count' => '2',
			'created_at' => date ("d-m-Y H:i"),
			'company_address' => '深圳福田区',
			'company_name' => '律团科技有限公司',
			'company_size' => '20',
			'education' => '本科以上学历',
			'position_responsibilities' => '负责产品的运营',
			'position_requirements' => '有新媒体运营经验',
			'contact_email' => 'hr@wdlst.com',
			'contact_phone' => '12345678901'
		);
		$positions[] = array(
			'id' => 5,
			'title' => 'PHP工程师',
			'position_count' => '1',
			'created_at' => date ("d-m-Y H:i"),
			'company_address' => '深圳福田区',
			'company_name' => '律团科技有限公司',
			'company_size' => '20',
			'education' => '本科以上学历',
			'position_responsibilities' => '负责后台程序的开发',
			'position_requirements' => '有大项目的开发经验',
			'contact_email' => 'hr@wdlst.com',
			'contact_phone' => '12345678901'
		);
		$positions[] = array(
			'id' => 6,
			'title' => '运营主管',
			'position_count' => '1',
			'created_at' => date ("d-m-Y H:i"),
			'company_address' => '深圳福田区',
			'company_name' => '律团科技有限公司',
			'company_size' => '20',
			'education' => '本科以上学历',
			'position_responsibilities' => '负责管理运营团队',
			'position_requirements' => '有新媒体运营经验',
			'contact_email' => 'hr@wdlst.com',
			'contact_phone' => '12345678901'
		);

		return $positions;
	}
}
